home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: node2_ct.html
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 53 54 | 4b 20 3a 20 46 69 72 73 |ts of ST|K : Firs|
|000000b0| 74 20 6c 65 76 65 6c 3c | 2f 54 49 54 4c 45 3e 0a |t level<|/TITLE>.|
|000000c0| 0a 3c 4d 45 54 41 20 48 | 54 54 50 2d 45 51 55 49 |.<META H|TTP-EQUI|
|000000d0| 56 3d 22 43 6f 6e 74 65 | 6e 74 2d 54 79 70 65 22 |V="Conte|nt-Type"|
|000000e0| 20 43 4f 4e 54 45 4e 54 | 3d 22 74 65 78 74 2f 68 | CONTENT|="text/h|
|000000f0| 74 6d 6c 3b 20 63 68 61 | 72 73 65 74 3d 75 74 66 |tml; cha|rset=utf|
|00000100| 2d 38 22 3e 0a 3c 4d 45 | 54 41 20 4e 41 4d 45 3d |-8">.<ME|TA NAME=|
|00000110| 22 76 69 65 77 70 6f 72 | 74 22 20 43 4f 4e 54 45 |"viewpor|t" CONTE|
|00000120| 4e 54 3d 22 77 69 64 74 | 68 3d 64 65 76 69 63 65 |NT="widt|h=device|
|00000130| 2d 77 69 64 74 68 2c 20 | 69 6e 69 74 69 61 6c 2d |-width, |initial-|
|00000140| 73 63 61 6c 65 3d 31 2e | 30 22 3e 0a 3c 4d 45 54 |scale=1.|0">.<MET|
|00000150| 41 20 4e 41 4d 45 3d 22 | 47 65 6e 65 72 61 74 6f |A NAME="|Generato|
|00000160| 72 22 20 43 4f 4e 54 45 | 4e 54 3d 22 4c 61 54 65 |r" CONTE|NT="LaTe|
|00000170| 58 32 48 54 4d 4c 20 76 | 32 30 32 32 22 3e 0a 0a |X2HTML v|2022">..|
|00000180| 3c 4c 49 4e 4b 20 52 45 | 4c 3d 22 53 54 59 4c 45 |<LINK RE|L="STYLE|
|00000190| 53 48 45 45 54 22 20 48 | 52 45 46 3d 22 54 63 6c |SHEET" H|REF="Tcl|
|000001a0| 39 33 2e 63 73 73 22 3e | 0a 0a 3c 4c 49 4e 4b 20 |93.css">|..<LINK |
|000001b0| 52 45 4c 3d 22 6e 65 78 | 74 22 20 48 52 45 46 3d |REL="nex|t" HREF=|
|000001c0| 22 6e 6f 64 65 33 5f 6d | 6e 2e 68 74 6d 6c 22 3e |"node3_m|n.html">|
|000001d0| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 70 72 65 76 |.<LINK R|EL="prev|
|000001e0| 69 6f 75 73 22 20 48 52 | 45 46 3d 22 6e 6f 64 65 |ious" HR|EF="node|
|000001f0| 31 5f 6d 6e 2e 68 74 6d | 6c 22 3e 0a 3c 4c 49 4e |1_mn.htm|l">.<LIN|
|00000200| 4b 20 52 45 4c 3d 22 75 | 70 22 20 48 52 45 46 3d |K REL="u|p" HREF=|
|00000210| 22 54 63 6c 39 33 5f 6d | 6e 2e 68 74 6d 6c 22 3e |"Tcl93_m|n.html">|
|00000220| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 6e 65 78 74 |.<LINK R|EL="next|
|00000230| 22 20 48 52 45 46 3d 22 | 6e 6f 64 65 33 5f 6d 6e |" HREF="|node3_mn|
|00000240| 2e 68 74 6d 6c 22 3e 0a | 3c 2f 48 45 41 44 3e 0a |.html">.|</HEAD>.|
|00000250| 20 0a 3c 42 4f 44 59 20 | 62 67 63 6f 6c 6f 72 3d | .<BODY |bgcolor=|
|00000260| 22 23 66 66 66 66 66 66 | 22 20 74 65 78 74 3d 22 |"#ffffff|" text="|
|00000270| 23 30 30 30 30 30 30 22 | 20 6c 69 6e 6b 3d 22 23 |#000000"| link="#|
|00000280| 39 39 34 34 45 45 22 20 | 76 6c 69 6e 6b 3d 22 23 |9944EE" |vlink="#|
|00000290| 30 30 30 30 66 66 22 20 | 61 6c 69 6e 6b 3d 22 23 |0000ff" |alink="#|
|000002a0| 30 30 66 66 30 30 22 3e | 0a 0a 3c 48 31 3e 3c 41 |00ff00">|..<H1><A|
|000002b0| 20 49 44 3d 22 53 45 43 | 54 49 4f 4e 30 30 30 32 | ID="SEC|TION0002|
|000002c0| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00000000|00000000|
|000002d0| 22 3e 0a 53 54 3c 53 4d | 41 4c 4c 3e 4b 20 3c 2f |">.ST<SM|ALL>K </|
|000002e0| 53 4d 41 4c 4c 3e 3a 20 | 46 69 72 73 74 20 6c 65 |SMALL>: |First le|
|000002f0| 76 65 6c 3c 2f 41 3e 0a | 3c 2f 48 31 3e 0a 0a 3c |vel</A>.|</H1>..<|
|00000300| 50 3e 0a 54 68 65 20 66 | 69 72 73 74 20 6c 65 76 |P>.The f|irst lev|
|00000310| 65 6c 20 6f 66 20 53 54 | 3c 53 4d 41 4c 4c 3e 4b |el of ST|<SMALL>K|
|00000320| 20 3c 2f 53 4d 41 4c 4c | 3e 20 75 73 65 73 20 74 | </SMALL|> uses t|
|00000330| 68 65 20 73 74 61 6e 64 | 61 72 64 20 53 63 68 65 |he stand|ard Sche|
|00000340| 6d 65 20 63 6f 6e 73 74 | 72 75 63 74 73 2e 20 54 |me const|ructs. T|
|00000350| 6f 20 77 6f 72 6b 20 61 | 74 0a 74 68 69 73 20 6c |o work a|t.this l|
|00000360| 65 76 65 6c 2c 20 61 20 | 75 73 65 72 20 6d 75 73 |evel, a |user mus|
|00000370| 74 20 6b 6e 6f 77 20 61 | 20 6c 69 74 74 6c 65 20 |t know a| little |
|00000380| 73 65 74 20 6f 66 20 72 | 65 77 72 69 74 69 6e 67 |set of r|ewriting|
|00000390| 20 72 75 6c 65 73 20 66 | 72 6f 6d 20 74 68 65 0a | rules f|rom the.|
|000003a0| 6f 72 69 67 69 6e 61 6c | 20 54 6b 2d 54 63 6c 20 |original| Tk-Tcl |
|000003b0| 6c 69 62 72 61 72 79 2e | 20 57 69 74 68 20 74 68 |library.| With th|
|000003c0| 65 73 65 20 72 75 6c 65 | 73 2c 20 74 68 65 20 54 |ese rule|s, the T|
|000003d0| 6b 20 6d 61 6e 75 61 6c | 20 70 61 67 65 73 20 61 |k manual| pages a|
|000003e0| 6e 64 20 61 20 6c 69 74 | 74 6c 65 0a 6b 6e 6f 77 |nd a lit|tle.know|
|000003f0| 6c 65 64 67 65 20 6f 66 | 20 53 63 68 65 6d 65 2c |ledge of| Scheme,|
|00000400| 20 68 65 2f 73 68 65 20 | 63 61 6e 20 65 61 73 69 | he/she |can easi|
|00000410| 6c 79 20 62 75 69 6c 64 | 20 61 20 53 54 3c 53 4d |ly build| a ST<SM|
|00000420| 41 4c 4c 3e 4b 20 3c 2f | 53 4d 41 4c 4c 3e 20 70 |ALL>K </|SMALL> p|
|00000430| 72 6f 67 72 61 6d 2e 0a | 0a 3c 50 3e 0a 43 72 65 |rogram..|.<P>.Cre|
|00000440| 61 74 69 6f 6e 20 6f 66 | 20 61 20 6e 65 77 20 77 |ation of| a new w|
|00000450| 69 64 67 65 74 20 28 62 | 75 74 74 6f 6e 2c 20 6c |idget (b|utton, l|
|00000460| 61 62 65 6c 2c 20 63 61 | 6e 76 61 73 2c 20 2e 2e |abel, ca|nvas, ..|
|00000470| 2e 29 20 69 73 20 64 6f | 6e 65 20 77 69 74 68 20 |.) is do|ne with |
|00000480| 73 70 65 63 69 61 6c 20 | 53 54 3c 53 4d 41 4c 4c |special |ST<SMALL|
|00000490| 3e 4b 20 3c 2f 53 4d 41 | 4c 4c 3e 0a 70 72 69 6d |>K </SMA|LL>.prim|
|000004a0| 69 74 69 76 65 73 20 70 | 72 6f 63 65 64 75 72 65 |itives p|rocedure|
|000004b0| 73 2e 20 46 6f 72 20 69 | 6e 73 74 61 6e 63 65 2c |s. For i|nstance,|
|000004c0| 20 63 72 65 61 74 69 6e | 67 20 61 20 6e 65 77 20 | creatin|g a new |
|000004d0| 62 75 74 74 6f 6e 20 63 | 61 6e 20 62 65 20 64 6f |button c|an be do|
|000004e0| 6e 65 20 77 69 74 68 0a | 3c 50 52 45 3e 0a 20 20 |ne with.|<PRE>. |
|000004f0| 20 20 28 62 75 74 74 6f | 6e 20 22 2e 62 22 29 0a | (butto|n ".b").|
|00000500| 3c 2f 50 52 45 3e 0a 4e | 6f 74 65 20 74 68 61 74 |</PRE>.N|ote that|
|00000510| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|00000520| 20 77 69 64 67 65 74 20 | 6d 75 73 74 20 62 65 20 | widget |must be |
|00000530| 60 60 73 74 72 69 6e 67 | 69 66 69 65 64 27 27 20 |``string|ified'' |
|00000540| 64 75 65 20 74 6f 20 74 | 68 65 20 53 63 68 65 6d |due to t|he Schem|
|00000550| 65 0a 65 76 61 6c 75 61 | 74 69 6f 6e 20 6d 65 63 |e.evalua|tion mec|
|00000560| 68 61 6e 69 73 6d 2e 20 | 54 68 65 20 63 61 6c 6c |hanism. |The call|
|00000570| 20 6f 66 20 61 20 77 69 | 64 67 65 74 20 63 72 65 | of a wi|dget cre|
|00000580| 61 74 69 6f 6e 20 70 72 | 69 6d 69 74 69 76 65 20 |ation pr|imitive |
|00000590| 64 65 66 69 6e 65 73 20 | 61 20 6e 65 77 0a 53 63 |defines |a new.Sc|
|000005a0| 68 65 6d 65 20 6f 62 6a | 65 63 74 2e 20 54 68 69 |heme obj|ect. Thi|
|000005b0| 73 20 6f 62 6a 65 63 74 | 2c 20 77 68 69 63 68 20 |s object|, which |
|000005c0| 69 73 20 63 6f 6e 73 69 | 64 65 72 65 64 20 61 73 |is consi|dered as|
|000005d0| 20 61 20 6e 65 77 20 62 | 61 73 69 63 20 74 79 70 | a new b|asic typ|
|000005e0| 65 20 62 79 20 74 68 65 | 0a 53 63 68 65 6d 65 20 |e by the|.Scheme |
|000005f0| 69 6e 74 65 72 70 72 65 | 74 65 72 2c 20 69 73 20 |interpre|ter, is |
|00000600| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 73 74 |automati|cally st|
|00000610| 6f 72 65 64 20 69 6e 20 | 61 20 76 61 72 69 61 62 |ored in |a variab|
|00000620| 6c 65 20 77 68 6f 73 65 | 20 6e 61 6d 65 20 69 73 |le whose| name is|
|00000630| 20 65 71 75 61 6c 0a 74 | 6f 20 74 68 65 20 73 74 | equal.t|o the st|
|00000640| 72 69 6e 67 20 70 61 73 | 73 65 64 20 74 6f 20 74 |ring pas|sed to t|
|00000650| 68 65 20 63 72 65 61 74 | 69 6f 6e 20 66 75 6e 63 |he creat|ion func|
|00000660| 74 69 6f 6e 2e 20 53 6f | 2c 20 74 68 65 20 70 72 |tion. So|, the pr|
|00000670| 65 63 65 64 69 6e 67 20 | 62 75 74 74 6f 6e 0a 63 |eceding |button.c|
|00000680| 72 65 61 74 69 6f 6e 20 | 77 6f 75 6c 64 20 64 65 |reation |would de|
|00000690| 66 69 6e 65 20 61 6e 20 | 6f 62 6a 65 63 74 20 73 |fine an |object s|
|000006a0| 74 6f 72 65 64 20 69 6e | 20 74 68 65 26 6e 62 73 |tored in| the&nbs|
|000006b0| 70 3b 3c 54 54 3e 2e 62 | 3c 2f 54 54 3e 20 76 61 |p;<TT>.b|</TT> va|
|000006c0| 72 69 61 62 6c 65 2e 20 | 54 68 69 73 20 6f 62 6a |riable. |This obj|
|000006d0| 65 63 74 0a 69 73 20 61 | 20 73 70 65 63 69 61 6c |ect.is a| special|
|000006e0| 20 6b 69 6e 64 20 6f 66 | 20 70 72 6f 63 65 64 75 | kind of| procedu|
|000006f0| 72 65 20 77 68 69 63 68 | 20 69 73 20 67 65 6e 65 |re which| is gene|
|00000700| 72 61 6c 6c 79 20 75 73 | 65 64 2c 20 61 73 20 69 |rally us|ed, as i|
|00000710| 6e 20 70 75 72 65 20 54 | 6b 2c 20 74 6f 0a 63 75 |n pure T|k, to.cu|
|00000720| 73 74 6f 6d 69 7a 65 20 | 69 74 73 20 61 73 73 6f |stomize |its asso|
|00000730| 63 69 61 74 65 64 20 77 | 69 64 67 65 74 2e 20 46 |ciated w|idget. F|
|00000740| 6f 72 20 69 6e 73 74 61 | 6e 63 65 2c 20 74 68 65 |or insta|nce, the|
|00000750| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 3c 50 52 45 | express|ion <PRE|
|00000760| 3e 0a 20 20 20 20 28 2e | 62 20 27 63 6f 6e 66 69 |>. (.|b 'confi|
|00000770| 67 75 72 65 20 0a 20 20 | 20 20 20 20 20 20 27 2d |gure . | '-|
|00000780| 74 65 78 74 20 22 48 65 | 6c 6c 6f 2c 20 77 6f 72 |text "He|llo, wor|
|00000790| 6c 64 22 20 0a 20 20 20 | 20 20 20 20 20 27 2d 62 |ld" . | '-b|
|000007a0| 6f 72 64 65 72 20 33 29 | 0a 3c 2f 50 52 45 3e 0a |order 3)|.</PRE>.|
|000007b0| 0a 70 65 72 6d 69 74 73 | 20 74 6f 20 73 65 74 20 |.permits| to set |
|000007c0| 74 68 65 20 74 65 78 74 | 20 61 6e 64 20 62 61 63 |the text| and bac|
|000007d0| 6b 67 72 6f 75 6e 64 20 | 6f 70 74 69 6f 6e 73 20 |kground |options |
|000007e0| 6f 66 20 74 68 65 26 6e | 62 73 70 3b 3c 54 54 3e |of the&n|bsp;<TT>|
|000007f0| 2e 62 3c 2f 54 54 3e 20 | 62 75 74 74 6f 6e 2e 20 |.b</TT> |button. |
|00000800| 41 73 0a 77 65 20 63 61 | 6e 20 73 65 65 20 6f 6e |As.we ca|n see on|
|00000810| 20 74 68 69 73 20 65 78 | 61 6d 70 6c 65 2c 20 70 | this ex|ample, p|
|00000820| 61 72 61 6d 65 74 65 72 | 73 20 6d 75 73 74 20 62 |arameter|s must b|
|00000830| 65 20 77 65 6c 6c 20 71 | 75 6f 74 65 64 20 69 6e |e well q|uoted in|
|00000840| 20 72 65 67 61 72 64 20 | 6f 66 20 74 68 65 20 0a | regard |of the .|
|00000850| 53 63 68 65 6d 65 20 65 | 76 61 6c 75 61 74 69 6f |Scheme e|valuatio|
|00000860| 6e 20 72 75 6c 65 73 2e | 20 53 69 6e 63 65 20 74 |n rules.| Since t|
|00000870| 68 69 73 20 6e 6f 74 61 | 74 69 6f 6e 20 69 73 20 |his nota|tion is |
|00000880| 62 61 72 65 6c 79 20 63 | 72 75 64 65 2c 20 74 68 |barely c|rude, th|
|00000890| 65 20 43 6f 6d 6d 6f 6e | 20 4c 69 73 70 0a 6b 65 |e Common| Lisp.ke|
|000008a0| 79 77 6f 72 64 20 6d 65 | 63 68 61 6e 69 73 6d 20 |yword me|chanism |
|000008b0| 68 61 73 20 62 65 65 6e | 20 69 6e 74 72 6f 64 75 |has been| introdu|
|000008c0| 63 65 64 20 69 6e 20 74 | 68 65 20 53 63 68 65 6d |ced in t|he Schem|
|000008d0| 65 20 69 6e 74 65 72 70 | 72 65 74 65 72 20 5b 23 |e interp|reter [#|
|000008e0| 21 43 4c 74 6c 32 21 23 | 5d 0a 3c 41 20 4e 41 4d |!CLtl2!#|].<A NAM|
|000008f0| 45 3d 22 74 65 78 32 68 | 74 6d 6c 31 22 20 48 52 |E="tex2h|tml1" HR|
|00000900| 45 46 3d 22 66 6f 6f 74 | 6e 6f 64 65 5f 6d 6e 2e |EF="foot|node_mn.|
|00000910| 68 74 6d 6c 23 66 6f 6f | 74 33 30 22 20 54 41 52 |html#foo|t30" TAR|
|00000920| 47 45 54 3d 22 66 6f 6f | 74 65 72 22 3e 3c 53 55 |GET="foo|ter"><SU|
|00000930| 50 3e 31 3c 2f 53 55 50 | 3e 3c 2f 41 3e 2e 20 43 |P>1</SUP|></A>. C|
|00000940| 6f 6e 73 65 71 75 65 6e | 74 6c 79 2c 20 74 68 65 |onsequen|tly, the|
|00000950| 20 70 72 65 63 65 64 69 | 6e 67 0a 65 78 70 72 65 | precedi|ng.expre|
|00000960| 73 73 69 6f 6e 20 63 6f | 75 6c 64 20 68 61 76 65 |ssion co|uld have|
|00000970| 20 62 65 65 6e 20 77 72 | 69 74 74 65 6e 20 61 73 | been wr|itten as|
|00000980| 20 20 0a 0a 3c 50 52 45 | 3e 0a 20 20 20 20 28 2e | ..<PRE|>. (.|
|00000990| 62 20 27 63 6f 6e 66 69 | 67 75 72 65 20 0a 20 20 |b 'confi|gure . |
|000009a0| 20 20 20 20 20 20 3a 74 | 65 78 74 20 22 48 65 6c | :t|ext "Hel|
|000009b0| 6c 6f 2c 20 77 6f 72 6c | 64 22 20 0a 20 20 20 20 |lo, worl|d" . |
|000009c0| 20 20 20 20 3a 62 6f 72 | 64 65 72 20 33 29 0a 3c | :bor|der 3).<|
|000009d0| 2f 50 52 45 3e 0a 0a 77 | 68 69 63 68 20 69 6e 20 |/PRE>..w|hich in |
|000009e0| 74 75 72 6e 20 69 73 20 | 62 6f 74 68 20 63 6c 6f |turn is |both clo|
|000009f0| 73 65 20 66 72 6f 6d 20 | 43 6f 6d 6d 6f 6e 20 4c |se from |Common L|
|00000a00| 69 73 70 20 61 6e 64 20 | 70 75 72 65 20 54 6b 2e |isp and |pure Tk.|
|00000a10| 20 4f 66 20 63 6f 75 72 | 73 65 2c 20 61 73 20 69 | Of cour|se, as i|
|00000a20| 6e 0a 54 6b 2c 20 70 61 | 72 61 6d 65 74 65 72 73 |n.Tk, pa|rameters|
|00000a30| 20 63 61 6e 20 62 65 20 | 70 61 73 73 65 64 20 61 | can be |passed a|
|00000a40| 74 20 77 69 64 67 65 74 | 20 63 72 65 61 74 69 6f |t widget| creatio|
|00000a50| 6e 20 74 69 6d 65 20 61 | 6e 64 20 6f 75 72 20 62 |n time a|nd our b|
|00000a60| 75 74 74 6f 6e 20 63 72 | 65 61 74 69 6f 6e 0a 61 |utton cr|eation.a|
|00000a70| 6e 64 20 69 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |nd initi|alizatio|
|00000a80| 6e 20 63 6f 75 6c 64 20 | 68 61 76 65 20 62 65 65 |n could |have bee|
|00000a90| 6e 20 64 6f 6e 65 20 69 | 6e 20 61 20 73 69 6e 67 |n done i|n a sing|
|00000aa0| 6c 65 20 65 78 70 72 65 | 73 73 69 6f 6e 3a 0a 3c |le expre|ssion:.<|
|00000ab0| 50 52 45 3e 0a 20 20 20 | 20 28 62 75 74 74 6f 6e |PRE>. | (button|
|00000ac0| 20 2e 62 20 0a 20 20 20 | 20 20 20 20 20 20 20 20 | .b . | |
|00000ad0| 20 3a 74 65 78 74 20 22 | 48 65 6c 6c 6f 2c 20 77 | :text "|Hello, w|
|00000ae0| 6f 72 6c 64 22 20 0a 20 | 20 20 20 20 20 20 20 20 |orld" . | |
|00000af0| 20 20 20 3a 62 6f 72 64 | 65 72 20 33 29 0a 3c 2f | :bord|er 3).</|
|00000b00| 50 52 45 3e 0a 0a 3c 50 | 3e 0a 54 68 65 20 54 6b |PRE>..<P|>.The Tk|
|00000b10| 20 62 69 6e 64 69 6e 67 | 20 6d 65 63 68 61 6e 69 | binding| mechani|
|00000b20| 73 6d 2c 20 77 68 69 63 | 68 20 73 65 72 76 65 73 |sm, whic|h serves|
|00000b30| 20 74 6f 20 63 72 65 61 | 74 65 20 77 69 64 67 65 | to crea|te widge|
|00000b40| 74 20 65 76 65 6e 74 20 | 68 61 6e 64 6c 65 72 73 |t event |handlers|
|00000b50| 20 66 6f 6c 6c 6f 77 0a | 74 68 65 20 73 61 6d 65 | follow.|the same|
|00000b60| 20 6b 69 6e 64 20 6f 66 | 20 72 75 6c 65 73 2e 20 | kind of| rules. |
|00000b70| 54 68 65 20 62 6f 64 79 | 20 6f 66 20 61 20 54 6b |The body| of a Tk|
|00000b80| 20 68 61 6e 64 6c 65 72 | 20 6d 75 73 74 20 62 65 | handler| must be|
|00000b90| 20 77 72 69 74 74 65 6e | 2c 20 6f 66 0a 63 6f 75 | written|, of.cou|
|00000ba0| 72 73 65 2c 20 69 6e 20 | 53 63 68 65 6d 65 2e 20 |rse, in |Scheme. |
|00000bb0| 46 6f 6c 6c 6f 77 69 6e | 67 20 65 78 61 6d 70 6c |Followin|g exampl|
|00000bc0| 65 20 73 68 6f 77 73 20 | 73 75 63 68 20 61 20 73 |e shows |such a s|
|00000bd0| 63 72 69 70 74 3b 20 69 | 6e 20 74 68 69 73 20 65 |cript; i|n this e|
|00000be0| 78 61 6d 70 6c 65 2c 20 | 74 68 65 0a 6c 61 62 65 |xample, |the.labe|
|00000bf0| 6c 20 69 6e 64 69 63 61 | 74 65 73 20 68 6f 77 20 |l indica|tes how |
|00000c00| 6d 61 6e 79 20 74 69 6d | 65 73 20 6d 6f 75 73 65 |many tim|es mouse|
|00000c10| 20 62 75 74 74 6f 6e 20 | 33 20 68 61 73 20 62 65 | button |3 has be|
|00000c20| 65 6e 20 64 65 70 72 65 | 73 73 65 64 2e 0a 42 75 |en depre|ssed..Bu|
|00000c30| 74 74 6f 6e 20 70 72 65 | 73 73 20 63 6f 75 6e 74 |tton pre|ss count|
|00000c40| 65 72 20 69 6e 63 72 65 | 6d 65 6e 74 20 69 73 20 |er incre|ment is |
|00000c50| 61 63 68 69 65 76 65 64 | 20 77 69 74 68 20 74 68 |achieved| with th|
|00000c60| 65 20 73 69 6d 70 6c 65 | 20 73 63 72 69 70 74 0a |e simple| script.|
|00000c70| 67 69 76 65 6e 20 69 6e | 20 74 68 65 20 3c 54 54 |given in| the <TT|
|00000c80| 3e 62 69 6e 64 3c 2f 54 | 54 3e 20 63 61 6c 6c 2e |>bind</T|T> call.|
|00000c90| 0a 3c 50 52 45 3e 0a 20 | 20 20 20 28 64 65 66 69 |.<PRE>. | (defi|
|00000ca0| 6e 65 20 63 6f 75 6e 74 | 20 30 29 0a 20 20 20 20 |ne count| 0). |
|00000cb0| 28 70 61 63 6b 20 27 61 | 70 70 65 6e 64 20 22 2e |(pack 'a|ppend ".|
|00000cc0| 22 20 0a 20 20 20 20 20 | 20 20 20 20 20 28 6c 61 |" . | (la|
|00000cd0| 62 65 6c 20 22 2e 6c 22 | 20 0a 20 20 20 20 20 20 |bel ".l"| . |
|00000ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 74 65 78 | | :tex|
|00000cf0| 74 76 61 72 69 61 62 6c | 65 20 27 63 6f 75 6e 74 |tvariabl|e 'count|
|00000d00| 29 20 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) . | |
|00000d10| 20 20 20 20 20 22 66 69 | 6c 6c 22 29 0a 20 20 20 | "fi|ll"). |
|00000d20| 20 28 62 69 6e 64 20 2e | 6c 20 22 26 6c 74 3b 33 | (bind .|l "<3|
|00000d30| 26 67 74 3b 22 20 0a 20 | 20 20 20 20 20 20 20 20 |>" . | |
|00000d40| 20 20 20 20 27 28 73 65 | 74 21 20 63 6f 75 6e 74 | '(se|t! count|
|00000d50| 20 28 2b 20 63 6f 75 6e | 74 20 31 29 29 29 0a 3c | (+ coun|t 1))).<|
|00000d60| 2f 50 52 45 3e 0a 0a 3c | 50 3e 0a 54 6f 20 69 6c |/PRE>..<|P>.To il|
|00000d70| 6c 75 73 74 72 61 74 65 | 20 53 54 3c 53 4d 41 4c |lustrate| ST<SMAL|
|00000d80| 4c 3e 4b 20 3c 2f 53 4d | 41 4c 4c 3e 20 66 69 72 |L>K </SM|ALL> fir|
|00000d90| 73 74 20 6c 65 76 65 6c | 20 6f 66 20 70 72 6f 67 |st level| of prog|
|00000da0| 72 61 6d 6d 69 6e 67 2c | 20 46 69 67 75 72 65 26 |ramming,| Figure&|
|00000db0| 6e 62 73 70 3b 31 20 73 | 68 6f 77 73 20 74 68 65 |nbsp;1 s|hows the|
|00000dc0| 20 73 69 6d 70 6c 65 0a | 66 69 6c 65 20 62 72 6f | simple.|file bro|
|00000dd0| 77 73 65 72 20 64 65 73 | 63 72 69 62 65 64 20 69 |wser des|cribed i|
|00000de0| 6e 20 5b 23 21 4f 75 73 | 74 65 72 2d 54 63 6c 21 |n [#!Ous|ter-Tcl!|
|00000df0| 23 5d 20 77 72 69 74 74 | 65 6e 20 69 6e 20 53 54 |#] writt|en in ST|
|00000e00| 3c 53 4d 41 4c 4c 3e 4b | 20 3c 2f 53 4d 41 4c 4c |<SMALL>K| </SMALL|
|00000e10| 3e 2e 0a 0a 3c 50 3e 0a | 0a 3c 44 49 56 20 63 6c |>...<P>.|.<DIV cl|
|00000e20| 61 73 73 3d 22 43 45 4e | 54 45 52 22 3e 3c 41 20 |ass="CEN|TER"><A |
|00000e30| 49 44 3d 22 34 36 22 3e | 3c 2f 41 3e 0a 3c 54 41 |ID="46">|</A>.<TA|
|00000e40| 42 4c 45 3e 0a 3c 43 41 | 50 54 49 4f 4e 20 63 6c |BLE>.<CA|PTION cl|
|00000e50| 61 73 73 3d 22 42 4f 54 | 54 4f 4d 22 3e 3c 53 54 |ass="BOT|TOM"><ST|
|00000e60| 52 4f 4e 47 3e 46 69 67 | 75 72 65 3a 3c 2f 53 54 |RONG>Fig|ure:</ST|
|00000e70| 52 4f 4e 47 3e 0a 3c 45 | 4d 3e 41 20 73 69 6d 70 |RONG>.<E|M>A simp|
|00000e80| 6c 65 20 66 69 6c 65 20 | 62 72 6f 77 73 65 72 3c |le file |browser<|
|00000e90| 2f 45 4d 3e 3c 2f 43 41 | 50 54 49 4f 4e 3e 0a 3c |/EM></CA|PTION>.<|
|00000ea0| 54 52 3e 3c 54 44 3e 3c | 49 4d 47 0a 20 53 54 59 |TR><TD><|IMG. STY|
|00000eb0| 4c 45 3d 22 22 20 53 52 | 43 3d 22 69 6d 67 31 2e |LE="" SR|C="img1.|
|00000ec0| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00000ed0| 6e 7b 66 69 67 75 72 65 | 2a 7d 7b 5c 73 6d 61 6c |n{figure|*}{\smal|
|00000ee0| 6c 0a 5c 76 73 6b 69 70 | 32 6d 6d 0a 5c 62 65 67 |l.\vskip|2mm.\beg|
|00000ef0| 69 6e 7b 71 75 6f 74 65 | 7d 0a 5c 62 65 67 69 6e |in{quote|}.\begin|
|00000f00| 7b 76 65 72 62 61 74 69 | 6d 7d 2e 2e 2e 22 3e 3c |{verbati|m}..."><|
|00000f10| 2f 54 44 3e 3c 2f 54 52 | 3e 0a 3c 2f 54 41 42 4c |/TD></TR|>.</TABL|
|00000f20| 45 3e 0a 3c 2f 44 49 56 | 3e 0a 0a 3c 50 3e 0a 0a |E>.</DIV|>..<P>..|
|00000f30| 3c 48 52 3e 0a 0a 3c 2f | 42 4f 44 59 3e 0a 3c 2f |<HR>..</|BODY>.</|
|00000f40| 48 54 4d 4c 3e 0a | |HTML>. | |
+--------+-------------------------+-------------------------+--------+--------+